Skip to content

update: concatenate Arrays when target node is an array#9

Open
paulRbr wants to merge 1 commit intolornajane:mainfrom
paulRbr:array-update
Open

update: concatenate Arrays when target node is an array#9
paulRbr wants to merge 1 commit intolornajane:mainfrom
paulRbr:array-update

Conversation

@paulRbr
Copy link
Contributor

@paulRbr paulRbr commented Dec 29, 2023

This is a suggestion to be able to update an array by concatenating
the given update array to any target array.

This is done only if target AND update are of array types.

An example overlay is provided as a unit test.

This is a suggestion to be able to update an array by concatenating
the given `update` array to any target array.

This is done only if target AND update are of `array` types.

An example overlay is provided as a unit test.
@lornajane
Copy link
Owner

Thanks for proposing this change. I think it's sensible and useful functionality, but it's covering something that isn't particularly clear in the overlays spec itself what the right behaviour is. We should probably try to clarify the intended behaviour before we merge a change to this library.

@philsturgeon
Copy link

Another similar conversation over here: OAI/Overlay-Specification#30

It would be good to really flesh out whats meant to happen with an array when its "updated", is it replaced, concatenated, merged (with overrides happening somehow), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants